package com.be.beadmin.device.entity;

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.be.beadmin.common.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.util.Date;

import javax.persistence.*;

/**
 * @website
 * @description /
 * @author zty
 * @date 2023-07-31
 **/
@Entity
@Getter
@Setter
@Table(name="t_de_maintenance_info")
public class MaintenanceInfo extends BaseEntity {

    @Column(name = "assigned_to",columnDefinition = "VARCHAR(20) COMMENT '指派人员'")
    private String assignedTo;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(value = "yyyy-MM-dd HH:mm")
    @Column(name = "begin_maintenance",columnDefinition = "datetime COMMENT '维修开始'")
    private Date beginMaintenance;

    @Column(name = "cost_time",columnDefinition = "float COMMENT '维修工时'")
    private Float costTime;

    @Column(name = "deviceid",columnDefinition = "VARCHAR(20) COMMENT '设备编号'")
    private String deviceId;

    @Column(name = "device_name",columnDefinition = "VARCHAR(20) COMMENT '设备名称'")
    private String deviceName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(value = "yyyy-MM-dd HH:mm")
    @Column(name = "end_maintenance",columnDefinition = "datetime COMMENT '维修结束'")
    private Date endMaintenance;

    @Column(name = "fault_desc",columnDefinition = "VARCHAR(200) COMMENT '故障描述'")
    private String faultDesc;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(value = "yyyy-MM-dd HH:mm")
    @Column(name = "fault_time",columnDefinition = "datetime COMMENT '故障时间'")
    private Date faultTime;

    @Column(name = "identification",columnDefinition = "VARCHAR(50) COMMENT '唯一标识'  not null")
    private String identification;

    @Column(name = "maintenanceid",columnDefinition = "VARCHAR(20) COMMENT '维修记录编号'")
    private String maintenanceid;

    @Column(name = "service_notes",columnDefinition = "VARCHAR(20) COMMENT '服务备注'")
    private String serviceNotes;

    @Column(name = "state",columnDefinition = "VARCHAR(20) COMMENT '状态'")
    private String state;
}
